package com.tang.portal.controller.admin.sys;

import com.tang.framework.core.controller.BaseController;
import com.tang.framework.core.domain.HttpResult;
import com.tang.framework.core.model.LoginUser;
import com.tang.portal.facade.admin.sys.SysOpenFacade;
import com.tang.service.admin.model.req.ReqLogin;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import jakarta.annotation.Resource;

/**
 * @Author tang jun liang
 * @Date 2023/5/6 22:51
 */
@Tag(name = "管理后台开放接口")
@RestController
@RequestMapping("/sys/open")
public class SysOpenController extends BaseController {

    @Resource
    private SysOpenFacade sysOpenFacade;


    @Operation(summary = "登录")
    @PostMapping("/login")
    public HttpResult<LoginUser> login(@RequestBody ReqLogin reqLogin){
        return sysOpenFacade.login(reqLogin);
    }
}
